#include <random.h>
#include <select.h>
#define P1 50
#define P2 30
#define P3 20

#define S1 P1
#define S2 P1+P2
#define S3 P1+P2+P3

unsigned long _select(void)
{	unsigned long a,i=1;
	a=_random();
	a%=100;
	if(a<S1)
		return i;
	i++;
	if(a<S2)
		return i;
	i++;
	if(a<=S3)
		return i;
	return 0;
}
